#include <iostream>
#include <vector>
using namespace std;
vector<double> arr(4);
vector<double> path;
vector<char> opr = { '+','-','*','/' };
int p[4] = { 0,0,1,1 };
string patho;
bool vis[4];
bool dfs(double sum)
{
    cout << sum << ' ' <<path.size()<< endl;
    if (sum > 24)
        return false;
    if (path.size() == 4 && sum == 24)
        return true;
    if (path.size() == 4 && sum != 24)
        return false;

    for (int i = 0; i < 4; i++)
    {
        if (!vis[i])
        {
            path.push_back(arr[i]);
            vis[i] = true;
            for (int j = 0; j < 4; j++)
            {
                patho.push_back(opr[j]);
                if (j == 0)
                {
                    if (dfs(sum + arr[i])) return true;
                }
                else if (j== 1)
                {
                    if (dfs(sum - arr[i])) return true;
                }
                else if (j == 2)
                {
                    if (dfs(sum * arr[i])) return true;
                }
                else if (j == 3)
                {
                    if (dfs(sum / arr[i])) return true;
                }
                patho.pop_back();
            }
          
            vis[i] = false;
            path.pop_back();
        }
    }
    return false;
}
int main()
{
    for (int i = 0; i < 4; i++)
        cin >> arr[i];
    for (int i = 0; i < 4; i++)
    {
        vis[i] = true;
        path.push_back(arr[i]);
        if(dfs(arr[i])) break;
        vis[i] = false;
        path.pop_back();
    }
    if (path.size()==4)
    {
        string ret;
        cout << "(("<< path[0]<< patho[0]<< path[1]<< ")"<< patho[1]<< path[2] <<")"<< patho[2]<< path[3];
  
        
    }
    else
        cout << "-1" << endl;
    return 0;
}